import { defineComponent as h, ref as r, watch as d, resolveComponent as m, openBlock as S, createElementBlock as g, normalizeClass as y, createVNode as p, mergeProps as V, withCtx as o, renderSlot as s } from "vue";
const _ = /* @__PURE__ */ h({
  __name: "index",
  props: {
    visiable: { type: Boolean, default: !1 },
    options: { default: () => [] },
    isScoroll: { type: Boolean, default: !1 },
    onSuccess: {}
  },
  emits: ["update:visiable"],
  setup(t, { emit: f }) {
    const a = t, u = f, l = r(a.visiable);
    d(
      () => a.visiable,
      (e) => l.value = e
    ), d(l, (e) => u("update:visiable", e));
    const n = r();
    return (e, i) => {
      const c = m("m-form"), v = m("el-dialog");
      return S(), g(
        "div",
        {
          class: y({ "m--choose-icon-dialog-body-height": e.isScoroll })
        },
        [
          p(v, V({
            modelValue: l.value,
            "onUpdate:modelValue": i[0] || (i[0] = (b) => l.value = b)
          }, e.$attrs), {
            default: o(() => [
              p(c, {
                ref_key: "formRef",
                ref: n,
                "label-width": "100px",
                style: { width: "600px" },
                options: e.options,
                onOnSuccess: e.onSuccess
              }, {
                uploadArea: o(() => [
                  s(e.$slots, "uploadArea")
                ]),
                tip: o(() => [
                  s(e.$slots, "tip")
                ]),
                _: 3
                /* FORWARDED */
              }, 8, ["options", "onOnSuccess"])
            ]),
            footer: o(() => [
              s(e.$slots, "footer", { form: n.value })
            ]),
            header: o(() => [
              s(e.$slots, "header")
            ]),
            _: 3
            /* FORWARDED */
          }, 16, ["modelValue"])
        ],
        2
        /* CLASS */
      );
    };
  }
}), w = {
  install(t) {
    t.component("m-modal-form", _);
  }
};
export {
  w as default
};
